Image generator for simulating the illumination effects of a vehicle-mounted light source on an image displayed on a screen

ABSTRACT

A method and apparatus for simulating the illumination effects of a vehicle-mounted light source in an image displayed on a screen. The image is intended to represent the appearance of a model defined in a database in world space coordinates from and eyepoint position in world space, the model being defined in terms of a plurality of features each having predetermined attributes. The vehicle-mounted light source is defined in terms of an origin and a direction in eyepoint space. For each feature potentially contributing to the image, the angular position of a point on that feature relative to the light source is calculated as the angle between the light source direction and a line drawn to that point from the light source. An illumination intensity for that point is determined by reference to the calculated angle, and the illumination intensity is reduced as a function of the distance from the eyepoint to the said point to provide a resultant intensity. The attributes of the feature at the said point are modulated as a function of the resultant intensity.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an image generator, and in particularto a computer image generator suitable for generating information inreal time from which an image can be derived for display in for examplea flight simulator.

2. Related Art

Real time image generators for flight simulators are used to simulateimages which are presented to pilots who are positioned in a mockaircraft cockpit. The intended viewer of the image produced by thesystem, that is the simulator "pilot", looks out through an imaginarywindow into a three-dimensional (3-D) world defined by informationstored as geometrical and other characteristic attribute data in a maindatabase. A line drawn from the eyepoint through the window intersects apoint in the 3-D world. The colour and intensity of that point must be"painted" on the window at the point of intersection of that line withthe window.

The displayed image is made up from a series of picture elements(pixels) each of which is of uniform colour and intensity, the colourand intensity of each pixel being a function of the position of theeyepoint relative to the 3-D world which the stored data represents. Ina real time display where hundreds of thousands of pixels must beupdated sufficiently quickly to avoid jumping of the image, it isnecessary to perform many millions of calculations per second tomaintain image fidelity.

The position of the eyepoint relative to the database changes over timein response to the manipulation of the flight controls of the simulatedaircraft. At any point in time the simulator produces an outputindicating the eyepoint position in world space coordinates, that is thecoordinate system of the database, and indicating the viewing direction,that is a vector drawn from the pilot's eyepoint through the centre ofthe viewing window. The database stores data identifying the positionand orientation of a large number of features that may contribute to thefinal image. The image generator calculates which of the features isvisible for the given eyepoint, the position of the boundaries of thefeatures relative to the viewing window, and the attributes such ascolour and intensity of the visible features. Occultation of one featureby another must be taken into account, and in high quality systems theeffects of one translucent feature occulting another must also be takeninto account.

The content of the database is used to derive the colour and intensityinformation for each pixel of the image to be displayed on a screenplaced in front of the simulator pilot. The centre of each pixel is on aunique predetermined imaginary viewing line extending from the eyepointto the screen and notionally extending through the screen onto thesurface of the model defined in the database. This means that the worldspace coordinate system of the database must be transformed using theeyepoint coordinates into a coordinate system having the eyepoint as itsorigin, that is an eyepoint space coordinate system, and the informationmust then be transformed from eyepoint space into a screen spacecoordinate system. The screen space coordinate system is twodimensional, having its origin at the centre of the display screen.These transformations enable the surface areas of the modelled featureswhich determine the colour and intensity of each pixel (for which thescreen space coordinates are known) to be determined. Once the featurescontributing to a particular pixel have been identified, the colour,intensity and other attributes of those features can be obtained fromthe database and appropriate calculations performed to determine thefinal displayed colour and intensity of the pixel.

If a high quality image is to be achieved, the final pixel colour andintensity must be based on a number of samples of the contributingfeatures taken at sampling points distributed across each pixel. Foreach feature making a contribution to an image it is necessary todetermine whether or not that feature overlaps each point in screenspace corresponding to a sampling point.

In most known CIG systems, the world space model is defined as a seriesof polygonal features. Light point features can also be displayed insome systems. In the case of polygonal features, each polygon isdescribed in the database by the world space coordinates of at least itsvertices, and these geometrical attributes must be transformed intoscreen space coordinates to take account of the position and orientationof the eyepoint. This involves an initial world space to viewpoint spacetransformation, followed by a viewpoint space to screen spacetransformation. The transformations are computationally intensiveoperations but do enable realistic images to be displayed. In the caseof a light point feature, it may be described in the database by forexample a position (coordinate of the light point centre) in worldspace. The position is transformed to screen space, and the feature canthen be displayed on a circular area of the screen centred on thetransformed position and having a radius which is a function of range,that is distance from the eyepoint.

CIG systems are known which can simulate the visual effects of landinglights. For example, U.S. Pat. No. 4,511,337 describes a system which iscapable of simulating the illumination of the ground resulting fromlight carried by an aircraft, including variations in the position,shape and size of the area illuminated with variations in the altitudeand attitude of the aircraft. This known system essentially displays aconic section and can produce acceptable results when simulating theillumination of a planar ground surface, e.g. a runway. In common withother attempts to simulate landing lights however this known systemcannot produce acceptable results when landing lights are required toilluminate other than the ground plane. For example, if an aircraftapproaches a terminal building, the "illuminated area" does not followwalls of the building but rather "illuminates" the ground plane withinthe building. Striking visual cues are thus lost or gross errors appearin the simulated scene.

Another problem associated with the simulation of aircraft and othervehicle lights is that of fog illumination. In some CIG systems, it ispossible to simulate the effects of fog in obscuring the visibility ofmodel features viewed through the fog by modulating the colour andintensity of the feature in accordance with the colour and density ofthe fog and the distance between the observer and the feature. In thecase of vehicle lights however a great deal of the visible effects ofthe lights results from scattering of light back to the observer in thevehicle.

SUMMARY OF THE INVENTION

It is an object of the present invention to obviate or mitigate theproblems outlined above.

According to the present invention there is provided a method forsimulating the illumination effects on a model of a vehicle mountedlight source in an image displayed on a screen, the image being intendedto represent the appearance of the model which is defined in a databasein world space coordinates from an eyepoint position in world space, themodel being defined in terms of a plurality of features each havingpredetermined attributes, and the vehicle mounted light source beingdefined in terms of an origin and a direction in eyepoint space, wherein

a. for each feature potentially contributing to the image, the angularposition of a point on that feature relative to the light source iscalculated as the angle between the light source direction and a linedrawn to that point from the light source,

b. an illumination intensity for that point is determined by referenceto the calculated angle,

c. the illumination intensity is reduced as a function of the distancefrom the eyepoint to the said point to provide a resultant intensity,and

d. the attributes of the feature at the said point are modulated as afunction of the resultant intensity.

The invention also provides an apparatus for simulating the illuminationeffects on a model of a vehicle mounted light source in an imagedisplayed on a screen, the image being intended to represent theappearance of the model which is defined in a database in world spacecoordinates from an eyepoint position in world space, the model beingdefined in terms of a plurality of features each having predeterminedattributes, and the vehicle mounted light source being defined in termsof an origin and a direction in eyepoint space, comprising

a. means for calculating, for each feature potentially contributing tothe image, the angular position of a point on that feature relative tothe light source as the angle between the light source direction and aline drawn to that point from the light source,

b. means for determining an illumination intensity for that point byreference to the calculated angle,

c. means for reducing the illumination intensity as a function of thedistance from the eyepoint to the said point to provide a resultantintensity, and

d. means for modulating the attributes of the feature at the said pointas a function of the resultant intensity.

Preferably, the screen is divided into a plurality of display cells eachcovering an array of pixels, the said angle is calculated at eachdisplay cell corner, the said resultant illumination intensity isdetermined at each display cell corner, and the illumination intensityat each pixel is determined by interpolation from the resultantillumination intensities at the respective display cell corners.

The cosine of the said angle may be calculated from the dot product of avector representing the said direction of the light source and a vectordirected from the light source to the said point on the feature.

Preferably the square of the cosine of the said angle is calculatedfrom: ##EQU1## where L_(x) =l_(x) /d_(x), L_(y) =l_(y) /d_(y), L_(z)=l_(z), X_(o) =x_(o) /d_(x), Y_(o) =y_(o) /d_(y), Z_(o) =z_(o),

(l_(x), l_(y), l_(z)) are the components of the vector representing thesaid direction of the light source.

(x_(s), y_(s)) are the screen space coordinates of the said point.

(x_(o), y_(o), z_(o)) are the eyepoint space coordinates of the lightsource

(x_(p), y_(p), z_(p)) are the eyepoint space coordinates of the saidpoint

srcf is a slant range correction factor

L_(o) =x_(o) l_(x) +y_(o) l_(y) +z_(o) l_(z)

L_(d) +x_(o) ² +y_(o) ² +z_(o) ²

d_(x) and d_(y) are functions of the half angle of the display

Illumination intensities are preferably calculated each frame for eachof a predetermined number of sample angles, the calculated values arestored in a look up table, and the stored values are addressed by thecalculated said angle to derive the appropriate illuminationintensities.

Preferably, range attenuation factors which are a function of rangesquared are calculated for the light source and stored in a look uptable, and the stored values are addressed by the square of the range toderive the appropriate range attenuation factor.

The invention further provides a method for simulating the illuminationeffects on the atmosphere of a vehicle mounted light source in an imagedisplayed on a screen, the image being intended to represent theappearance of a model which is defined in a database in world spacecoordinates from an eyepoint position in world space, the model beingdefined in terms of a plurality of features each having predeterminedattributes, and the vehicle mounted light source being defined in termsof an origin and a direction in eyepoint space, wherein

a. a triangular beam polygon is defined having one apex at the origin ofthe light source, the beam polygon lying in a plane including an axisthrough the origin parallel to the said direction, being normal to aline drawn from the eyepoint and intersecting the said axis, and havinga defined length and half angle from the said one vertex,

b. second and third vertices of the beam polygon are calculated,

c. the intensity of illumination of the beam polygon is calculated as afunction of distance from the light source, and

d. the beam polygon is displayed on the screen in accordance with itscalculated vertices and intensity.

Preferably, a plane equation Ax+By+Cz+D=0 is calculated for the beampolygon from coordinates of the origin of the light source andcomponents of a vector corresponding to the said axis, and the secondand third vertices are calculated from the plane equation and the saiddefined length and half angle.

The invention also provides an apparatus for simulating the illuminationeffects on the atmosphere of a vehicle mounted light source in an imagedisplayed on a screen, the image being intended to represent theappearance of a model which is defined in a database in world spacecoordinates from an eyepoint position in world space, the model beingdefined in terms of a plurality of features each having predeterminedattributes, and the vehicle mounted light source being defined in termsof an origin and a direction in eyepoint space, the apparatus comprising

a. means for defining a triangular beam polygon having one apex at theorigin of the light source, the beam polygon lying in a plane coincidentwith an axis through the origin parallel to the said direction, beingnormal to a line drawn from the eyepoint and intersecting the said axis,and having a defined length and half angle from the said one vertex,

b. means for calculating second and third vertices of the beam polygon,

c. means for calculating the intensity of illumination of the beampolygon as a function of distance from the light source, and

d. means for displaying the beam polygon on the screen in accordancewith its calculated vertices and intensity.

BRIEF DESCRIPTION OF THE DRAWINGS

An embodiment of the present invention will now be described, by way ofexample, with reference to the accompanying drawings, in which:

FIG. 1 is a schematic illustration of the basic configuration of a CIGsystem in accordance with the present invention;

FIG. 2 is a schematic illustration of a transformation engine suitablefor use in a system of the type illustrated generally in FIG. 1;

FIG. 3 illustrates the inter-relationship between various sub-areas ofscreen space in the embodiment of the present invention;

FIG. 4 is a schematic illustration of basic components of the renderingengine described in outline with reference to FIG. 1;

FIG. 5 schematically illustrates the geometry of landing lightsimulation in accordance with the present invention;

FIG. 6 illustrates the geometry of fog illumination by landing lights inaccordance with the present invention; and

FIG. 7 illustrates the structure of a landing light processor accordingto the invention.

DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS

Referring to FIG. 1, this illustrates the basic functional components ofan embodiment of the present invention adapted for use in a flightsimulator. The simulator incorporates a host computer 1 which providesoutputs corresponding to the position and attitude of the simulatedaircraft relative to a world space model of the earth surface. An imageis to be displayed which is representative of the appearance of themodel surface to an observer in the simulated aircraft. In the describedembodiment, the image is projected onto a back projection screen. Theobserver views the reflection of the back projection screen in a largespheroidal mirror. It will be appreciated however that alternativedisplay systems may be used.

A system manager (SM) 2 receives the outputs of the host computer 1describing the aircraft position and attitude and downloads from adatabase model-describing data corresponding to those portions of themodel which are potentially visible from the observer's eyepoint giventhe position and attitude of the simulated aircraft. The image isprojected as a plurality of raster scanlines. Calligraphic light pointscould be superimposed on the image raster using conventional techniques.

The model-describing data is predetermined during model production butwill describe features of the modelled scene, for example runways,buildings and fields, in terms related to a set of world spacecoordinates with a predetermined origin. The model may include a varietyof different feature types, for example straight edged polygonalfeatures, and circular light points. The model describing data ishierarchically ordered such that most individual features of the modelare defined by reference to objects of which they form a part, and thoseobjects are in turn defined by reference to other objects in the model.Thus the model world will generally define a feature in "object space",that is with reference to a coordinate system having its origin and axesrelated to an object such as a building. The coordinate system of thatobject is then referenced to world space coordinates either directly orthrough one or more further objects. The term "world space coordinates"is used herein to include both direct reference to the coordinate systemof the main database and indirect reference to the coordinate system ofthe main database through one or more "object spaces".

The extracted model-describing data is passed to a transformation engine(TE) 3 which performs two main functions, that is geometrictransformation of model feature data from the database or world spacecoordinate system to the observers or eyepoint coordinate system, andperspective transformation from the 3-D eyepoint coordinate system to a2-D screen space coordinate system. The techniques used to achieve suchtransformations are well known and accordingly are not elaborated indetail here.

The TE 3 provides a stream of model-describing data in screencoordinates to a rendering engine (RE) 4. The RE 4 performs a number offunctions using model feature geometric attribute data (e.g. size andposition) and model feature non-geometrical attribute data (e.g. colour,translucency) received from the TE 3 to produce a final colour for eachpixel of the image to be displayed. Data representing thenon-geometrical attribute data is loaded into a frame store within theRE 4, the frame store having a storage address in respect of each pixelin the final display. The contents of the frame store are down loaded todisplay device 5 which produces the final image. The system thus hasfour main pipeline stages; such that as one image frame is beingdisplayed, the next frame to be displayed is being rendered in the RE 4,the next but one frame to be displayed is being processed in the TE 3,and the next but two frame to be displayed is being processed in the SM2. Each stage is separated from the or each adjacent stage by a doublebuffered store. A frame swap signal is generated to cause all the doublebuffered stores to swap in unison. Thus data relevant to one frame iseffectively "clocked" through the pipeline by the frame swap signal.

FIG. 2 illustrates the TE 3 of FIG. 1 in more detail. The TE processesdata previously read out from the SM 2 into a channel active database(CADB) 6. The contents of the CADB 6 corresponds to all the data withinthe main database which is within potentially visible range of theeyepoint. The CADB 6 comprises a memory 7 and control logic 8 whichcontrols the read out data from the memory to an array of objectprocessors 9 that in turn provides control inputs to the control logic8. The memory 7 holds the entire active database and the control logic 8selects object data for processing. The object processor array 9comprises individual object processors 10 arranged in groups onrespective boards 11. These processors form the main computationalelement of the TE 3.

A common output 12 of the object processor array 9 is delivered to ascan converter 13 incorporating a logic unit 14 providing an output to ascan converter store 15. An attribute store 16 receives input via thescan converter 13. The stores 15 and 16 provide the outputs of the TE 3to the rendering engine RE 4.

The object processors 10 perform a variety of functions, includingcontrolling the distribution of data to the object processor in anefficient manner, performing a range cull to discard all objects whichare at a range too great for them to be visible from the eyepoint, andperforming a field of view cull to discard all objects which arecompletely outside the field of view given by the position of theviewing window or screen relative to the eyepoint. For all features notculled in this processing, the geometrical attributes must be processed.This processing includes a series of basic procedures, such as backfaceremoval (culling all features that cannot be seen from the eyepoint asthey face away from the eyepoint), plane equation attribute calculation(using the coefficients of the plane in eyepoint space of each featurethat is potentially visible), and field of view culling (culling allfeatures which are completely outside the field of view represented bythe viewing window). These procedures are not directly relevant to thepresent invention and therefore will not be described in detail herein.The transformation engine does transform data required for thesimulation of landing lights in accordance with the present inventionand this processing is described in detail below.

Subdivision of display screen

The displayed image is made up from a regular array of pixels which donot overlap and which together cover all of the screen. Each pixel isprojected by the raster scan display device as an area of uniform colourand intensity. FIG. 3 includes four illustrations of varioussubdivisions of the screen, the leftmost illustration being to onequarter of the scale of the three other illustrations.

In FIG. 3, the shaded areas identified by reference numeral 17 eachcorrespond to one pixel. The screen is divided into sub-areas or cellseach covering a respective rectangular array of pixels, in theillustrated case a four by four array. Numeral 18 in FIG. 3 points tothe boundary of one cell. Adjacent cells do not overlap. Superimposed oneach cell is a pseudocell which covers the respective cell and a halfpixel boundary around that cell. Broken lines 19 in FIG. 3 correspond toa pseudocell boundary. Thus adjacent pseudocells overlap each other.Each pseudocell is divided into a regular array of abuttingpseudopixels, e.g. a four by four array of pseudopixels. The shadedareas 20 in FIG. 3 each correspond to one pseudopixel. Superimposed onthe pseudocells are supercells, each covering a respective rectangulararray of pseudocells, e.g. a four by four array of pseudocells in theillustrated case. Thus adjacent supercells overlap each other. Thebroken line 21 indicates a supercell boundary, and shaded area 22 onepseudocell within that supercell. Thus each supercell covers sixteenpseudocells, and those sixteen pseudocells together cover sixteen cellsplus a half pixel wide boundary around the edge of those sixteen cells.It is necessary for adjacent supercells, adjacent pseudocells andadjacent pseudopixels to overlap to achieve anti-liaising.

For the illustrated case of a four by four pixel cell, and a four byfour pseudocell supercell, and assuming a display area of 1024 by 1024pixels, there are 64×64 supercells and 256×256 pseudocells.

Scan converter

For each feature delivered to the scan converter (FIG. 2) by the objectprocessors, the scan converter identifies all of the supercells whichare at least partially overlapped by that feature. The scan converterassigns an identity (ID) to each feature, locates the supercellsimpacted by that feature, and passes the feature ID to the scanconverter store 15 (hereinafter referred to as the supercell store).

The Rendering Engine

The RE 4 of FIG. 1 will now be described in outline with reference toFIG. 4. FIG. 4 shows the supercell store 15 and attribute store 16 ofFIG. 2. It will be recalled that the supercell store and attribute storeare both double-buffered, the contents of the stores being read out inresponse to receipt of a start of frame signal. The content of thesupercell store is read out on output 23 supercell by supercell into apresorter 24 which also receives geometrical attribute data from theattribute store 16 on output 25. The presorter and attribute storeprovide respective outputs 26 and 27 to a special effects module 28, acolour mixer 29, and a postsorter 30. The postsorter 30 feeds rasterimage data to a frame store 31 and an output 32 from the frame store isdelivered to the display device (display device 5 of FIG. 1).

The function of the presorter 24 is to subdivide each supercell into aseries of pseudocells, to compute the effective depth (distance from theeyepoint) of each feature at each pseudocell corner, to detect anyfeature which is opaque and fully covers a pseudocell, and to discardany features from consideration in respect of any one pseudocell if suchfeatures lie behind an opaque feature fully covering that pseudocell.Thus given a pseudocell size which is four by four display pixels plus ahalf pixel boundary, each supercell ID list will be considered for eachof sixteen pseudocells in turn.

The IDs accumulated in the supercell store 15 are downloaded to thepresorter 24 one stack at a time. Corresponding attributes aresimultaneously downloaded to the presorter from the attribute store 16.Thus the presorter receives the contents of one stack, corresponding toone supercell, and processes the features identified by the stackcontents, before the next stack is downloaded.

If the presorter indicates that a feature impacts (at least partiallycovers) the pseudocell being processed, a "fragment" data packet isgenerated and applied to the fragment carrying output bus 26. This datapacket comprises only the screen space coordinates of the four cornersof the relevant pseudocell and the impacting feature ID. The fragmentsof features thus identified are then processed in the special effectsmodule 28, the colour mixer 29, and the postsorter 30.

The units 28 to 30 operate on the basis of pseudopixels. In theillustrated case sixteen pseudopixels fully cover (but do not extendbeyond) a respective pseudocell. The corners of the pseudopixels areinterpolated from the corners of the relevant pseudocell carried by thefragment bus. As described in more detail below, the special effectsmodule 28 generates, for each pseudopixel of the pseudocell beingprocessed, an output appropriate to the simulation of landing lights.The special effects module may also produce outputs appropriate to anyother special effects the attributes of the feature being processeddemand, e.g. texture effects or fog effects. The special effect outputsare applied to the colour mixer 29 where further effects such as ambientlighting are processed, the colour mixer delivering an RGBT (red, green,blue, translucency) output for each pseudopixel to the postsorter 30.The postsorter provides an output to the frame store 31. The frame storeprovides output 32 to the raster display device 5 (FIG. 1).

The function of the postsorter 30 is to resolve the effects of surfaceshiding or partially hiding other surfaces. It does this by assessing theimpact of features on an array of sampling points, accumulating andweighting the effects of such impacts, and providing a final RGB outputfor each display pixel to the frame store. Each pseudopixel fragmentreceived by the postsorter covers a respective array of sampling pointsdistributed across the pixel array corresponding to each pseudocell.Typically there may be two hundred sampling points, that is eight perpixel. (It will be recalled that each pseudocell in the describedexample covers a four by four pixel array plus a half pixel wideboundary). The position of every sampling point relative to the four byfour pseudopixel array defined for each pseudocell is known, andtherefore it is necessary to decide, for each sampling point, whether ornot a feature impacts that point, and only if impact is detected toaccumulate the RGBT inputs to the postsorter from the correspondingpseudopixel.

Each sampling point may be overlapped by a large number of features andit is necessary to depth sort those features to discard those which arefully occulted by nearer (to the eyepoint) opaque features at thatsampling point. To this end, the distance (from the eyepoint) of eachfeature at each sampling point is calculated. The RGBT and depth of thefirst feature impacting a sampling point is loaded into a respectivestore. Subsequent features are depth compared with the first storedfeature, features being discarded from the store (or not entered) exceptfor the current nearest opaque feature and translucent features nearerthan the nearest opaque feature. Once all the features potentiallyrelevant to a cell have been so processed, the cumulative effects of allthe features identified in each stack are calculated to produce a finalRGB output for each sampling point. Those outputs are then weighted andaccumulated to produce a single RGB for each pixel. Each pixel willrespond to contributions from the eight sampling points within its ownboundary and sampling points within a half pixel wide bordertherearound, that is thirty-two sampling points in all (1×8+4×4+4×2).The total area covering the thirty-two sampling points is thus equal tothe area of a two by two pixel array but is centered on the centre ofone display pixel.

The attribute store 16, supercell store 15, and frame store 53 are alldouble-buffered so as todefine the boundaries between separate stages inthe pipe-lined system.

The system described and outlined above is of a type to which thepresent invention may be applied, although it will be appreciated thatthe present invention may be applied in systems having a differentgeneral structure. In the system described above, the present inventionis implemented within the special effects module and the colour mixerand accordingly the functions of these components will now be describedin greater detail.

Referring to FIG. 5, this illustrates the basic geometry of landinglight simulation in an embodiment of the present invention. An observerat eyepoint E is presented with an image projected onto a screen 33,that image being intended to represent a scene made up from a number offeatures including a polygon 34 part of which is illuminated by a beamfrom a landing light. The landing light casts a conical beam of lightfrom source O, the beam centre axis coinciding with the major axis ofthe cone. The beam axis is represented by vector 1.

To an observer at O, the apparent shape of the `footprint` formed by thebeam illuminating any surface would be circular. To an observer at E,the apparent shape is a function of the angle between the beam centreaxis and the normal to any surface it strikes. A beam illuminating thefoot of a corner of a building would appear to an observer at E toproduce a shape made up from three partial conic sections, one for theground plane, and one each for the two walls meeting at the corner.

In the illustrated case, part of the polygon 34 is illuminated by thebeam and part is not. For a point P on the polygon to be illuminated bythe beam the angle θ between the beam axis and a line drawn from thelight source origin must be less than the half angle of the beam. Theintensity of illumination of a point within the beam will also be afunction of θ, the intensity profile of light beams generally beingnon-linear, for example Gaussian such that intensity is greatest on thebeam axis and falls non-linearly with angular deviation from the beamaxis. Other intensity profiles are of course possible. Thus for thepoint P to be correctly illuminated it is necessary to calculate theangle θ and the amount of light falling on a point located on any linesubstending angle θ with the beam axis.

Cos θ may be derived from:

    OP·l=|OP||l| cos θ

where OP is the vector from the light source O to the point P l is thebeam axis direction vector

By selecting the magnitude of l to be one, we have: ##EQU2## where(x_(p) y_(p) z_(p)) is the position of point P in eyepoint space

(x_(o) y_(o) z_(o)) is the position of the source O in eyepoint space.

The position of the point P can be computed from screen coordinates andZ depth z_(p) by

    x.sub.p =x.sub.s z.sub.p /d.sub.x

    y.sub.p =y.sub.s z.sub.p /d.sub.y

    z.sub.p =z.sub.p

where (x_(s) y_(s)) are the screen coordinates of a point through whicha line from E to P passes, and

d_(x) and d_(y) are functions of the half angle of the display.

Thus:

    Cos θ=[(x.sub.s l.sub.x /d.sub.x +y.sub.s l.sub.y /d.sub.y +l.sub.z)z.sub.p -L.sub.o ]/|OP|

where L_(o) =x_(o) l_(x) +y_(o) l_(y) +z_(o) l_(z) is a constant for anyone frame.

The value |OP| can be calculated as follows: ##EQU3## where L_(d) =x_(o)² +y_(o) ² +z_(o) ²

Thus |OP|² =z_(p) ² [srcf² -(2/Z_(p))(x_(s) x_(o) /d_(x) +y_(s) y_(o)/d_(y) +z_(o))+L_(d) /z_(p) ² ] and hence ##EQU4##

This can be simplified to: ##EQU5## where L_(x) =l_(x) /d_(x), Ly=l_(y)/d_(y), L_(z) =l_(z) and X_(o) =x_(o) /d_(x), Y_(o) =y_(o) /d_(y), Z_(o)=z_(o) and are constant for any particular frame.

The factors which are constant for any one frame are calculated in thetransformation engine and distributed to the special effects module inwhich further landing light simulation processes are executed. Thetransformation engine also transforms the landing light source anddirection from world space to eyepoint space.

The special effects module performs the following tasks:

a. For each feature contributing to the image, e.g. the polygon of FIG.5, cos² θ is calculated at each corner of each display cell. A displaycell is the array of pixels overlapped by a respective pseudocell. Thusin the case illustrated in FIG. 3, each display cell is made up from anarray of sixteen pixels, and adjacent display cells have coincidentcorners.

b. The intensity of illumination at each display cell corner isdetermined. This is achieved by looking up an appropriate intensityvalue I_(int) from an intensity (angular) distribution table that hasbeen previously established for the light source in question. The tableis addressed by Cos² θ. c. The intensity value derived from the look-uptable is reduced as a function of range. This is achieved by calculatingrange squared at each display cell corner and using it to address alook-up table in which attenuation factors R_(att) are stored. The ranger to any point P having eyepoint space coordinates (x_(p), y_(p),z_(p),) could be derived from:

    r=sqrt(x.sub.p.sup.2 +y.sub.p.sup.2 +z.sub.p.sup.2)

The use of this equation in real time would be computationally intensiveand therefore a slant range correction factor (srcf) is calculatedwhere:

    r=z.sub.p.srcf

and srcf=sqrt [1+(x_(s) /d_(x))² +(y_(s) /d_(y))² ]

Thus the resultant intensity I_(res) is derived from the interpolatedlook up table intensity I_(int) and the attenuation factor R_(att) usingthe equation:

    I.sub.res =I.sub.int ·R.sub.att

d. The intensity at the centre of each of the sixteen pseudopixelsforming the pseudocell overlapping the display cell is calculated bybi-linear interpolation of the I_(res) values calculated for the displaycell corners.

e. The sixteen interpolated intensity values are output to the colourmixer.

If there is more than one landing light it is necessary to perform thetasks of Cos² θ calculation and intensity look-up for each landing lightseparately. For each landing light, an intensity is calculated at eachcell corner. Thereafter the intensities for all the landing lights canbe summed at each display cell corner and the summed intensities arethen reduced as a function of range in a single process, prior topseudopixel centre intensity value interpolation.

In the colour mixer, the intensity values for each pseudopixel are usedin a conventional manner to modulate the attributes of featurescontributing to the image in accordance with the colour of the lightsource and its intensity at the feature. This may be achieved usingconventional techniques however and therefore these techniques are notdescribed further herein.

A landing light beam may be attenuated by fog. The intensity of lightreaching a feature is reduced, as is the visibility of light travellingfrom the feature to the eyepoint. It is possible to take account ofattenuation between the feature and the eyepoint by using a simple "fog"attenuation factor that is a function of range. Ideally, to take accountof attenuation between the source and the feature, an attenuation factorshould be used which is a function of source to feature distance. As areasonable approximation however, it can be assumed that the source tofeature distance is equal to the range.

The above description indicates how the illumination of features in themodelled world can be correctly simulated, but assumes that there is noscattering of light beams due to atmospheric effects such as rain orfog. In practice it is highly desirable to be able to simulate sucheffects. In accordance with the present invention this is achieved usinga beam polygon the eyespace position of which is dependent upon theeyespace position of the light source and its direction.

Referring to FIG. 6, this illustrates the basic geometry. The eyepoint Eand landing light source O are positioned relative to the screen 33exactly as illustrated in FIG. 5. It is assumed however that there is nopolygon in front of the light source to be illuminated. A portion of thebeam is visible from the eyepoint E however through the screen 33. Abeam polygon defined as a triangle having vertices A, B, O defines anarea to be illuminated by the beam. The triangle ABO is isosceles andits axis OC coincides with the direction of the beam.

A line drawn from the eyepoint E to a point N on the axis OC isperpendicular to that axis. The coordinates of the point N are given by:

    EN=EO+rl

but r=EO.l=x_(o) l_(x) +y_(o) l_(y) +z_(o) l_(z) =L_(o)

Hence: ##EQU6##

given that the light source O has eyepoint coordinates (x_(o) y_(o)z_(o)), and

the beam axis l has components (l_(x) l_(y) l_(z))

These are the components of the vector EN which is normal to the axis l.The plane of the beam polygon is deemed to be perpendicular to thevector EN, and thus the plane equation of the beam polygon can be formedas:

    Ax+By+Cz+D=O

where

    A=x.sub.o +L.sub.o l.sub.x

    B=y.sub.o +L.sub.o l.sub.y

    C=z.sub.o +L.sub.o l.sub.z

    D=-(Ax.sub.o +By.sub.o +Cz.sub.o)

The thus derived plane equation is normalised and the vertices A and Bof the beam polygon are formed as follows:

Vertex C (on the straight line AB) has coordinates (x_(c), y_(c), z_(c))and

    x.sub.c =x.sub.o +L l.sub.x

    y.sub.c =y.sub.o +L l.sub.y

    z.sub.c =z.sub.o +L l.sub.z

where L is the length of the beam polygon. This length is determinedwhen the light source is modelled.

A unit vector e along AB has components (x_(e), y_(e), z_(e)) and

    x.sub.e =C l.sub.y -B l.sub.z

    y.sub.e =A l.sub.z -C l.sub.x

    z.sub.e =B l.sub.x -A l.sub.y

(x_(e), y_(e), z_(e)) is in fact the cross product of the unit vector land the unit plane normal (A, B, C).

The vector OA is then given by:

    OA=OC+e L tan ω

Where ω is the half angle of the beam polygon and vector OB is given by:

    OB=OC-eL tan ω

hence OA=L (l+e tan ω), OB=L (l-e tan ω) and the coordinates of A are(x_(a) y_(a) z_(a)) where:

    x.sub.a =x.sub.o +L[l.sub.x +(C l.sub.y -B l.sub.z) tan ω)

    y.sub.a =y.sub.o +L[l.sub.y +(Al.sub.z -Cl.sub.x) tan ω)

    z.sub.a =z.sub.o +L[l.sub.z +(B l.sub.x -A l.sub.y) tan ω)

The coordinates of B may be similarly calculated.

Given the beam polygon vertices, an assessment of whether or not thebeam polygon is visible from the eyepoint can be made in exactly thesame manner as for any other polygon. These techniques will not bedescribed further herein. The intensity of illumination of the polygondoes require discussion however as this intensity is a function ofdistance from the light source.

In the case of conventional polygons illuminated by a landing light,intensity is reduced with polygon range from the eyepoint. In the caseof beam polygons, the intensity of illumination reduces from a maximumat the light source towards the end of the beam polygon formed by lineAB, and varies across the beam axis. Thus a further range attenuationlook-up table is built up which is addressed by |OP|² cos² θ.

Given that cos² θ is known as described above, then:

    |OP|.sup.2 cos.sup.2 θ=z.sub.p.sup.2 [x.sub.s l.sub.x /d.sub.x +y.sub.s l.sub.y /d.sub.y +l.sub.z -L.sub.o /z.sub.p ].sup.2

These terms have already been calculated as described above.

Once a beam polygon has been identified as impacting a particularsampling point, it is then processed as with any other polygon.

It will be appreciated that the beam polygon should be transparent toprevent it obscuring light points or other features located behind it,and to prevent it from being "illuminated" by other light sources.

Referring now to FIG. 7, this illustrates the functional structure of alanding light processor for implementing the processes described above.Input to the processor are the slant range correction factor srcf,inverse z, the coordinates (x_(cij), y_(cij)) of a display cell corner,and data that is constant per field, e.g. L_(o). At any one time theprocessor is considering a point on a single polygon or other feature,the screen space coordinates of that point being (x_(cij), y_(cij)). Aprocessor 34 calculates range squared and inverse Z squared. Rangesquared is used via a footprint range function unit 35 to control rangeattenuation for conventional polygons illuminated by a landing light.Inverse Z squared is required for beam polygon range attenuation via abeam range function unit 36. The appropriate range function is selectedby unit 37 in dependence upon the polygon type and intensity attenuationis processed in an intensity attentuation unit 38.

Three landing light units 39 are shown, although any desired number ofunits could be provided. Each independently calculates cos² θ relativeto its respective landing light, and addresses the appropriate entry ina look up table (LUT) to access the appropriate intensity data. Beampolygon intensity outputs are delivered to beam range function unit 36,and other outputs are delivered to an intensity summation unit 40 theoutput of which is delivered to the intensity attenuation processor 38.Intensity values for each pseudopixel within the display cell are thenderived in an interpolator 41. Those values are then processed incompressor 42 and output to the colour mixer.

We claim:
 1. A method for displaying an image simulating theillumination effects of a vehicle-mounted light source in an imagedisplayed on a screen, the image being intended to represent theappearance of a model structure which is defined in a digital signaldatabase in world space coordinates from an eyepoint position in worldspace, the model structure being defined in terms of a plurality ofstructural features each having predetermined structural attributes, andthe simulated vehicle-mounted light source being defined in terms of anorigin and a direction in eyepoint space, said method comprising thesteps of:a. determining, for each structural feature potentiallycontributing to the displayed image, the angular position of a point onthat structural feature relative to the light source as the anglebetween the light source direction and a line drawn to that point fromthe light source, b. determining an illumination intensity for thatpoint by reference to said angle, c. reducing the illumination intensityas a function of the distance from the eyepoint to said point to providea resultant intensity, and d. modulating the displayed attributes of thestructural feature at said point in a displayed image on said screen asa function of said resultant intensity.
 2. A method according to claim1, wherein:said screen comprises a plurality of display cells eachcovering an array of pixels, the said angle being determined at eachdisplay cell corner, said resultant illumination intensity also beingdetermined at each display cell corner, and said illumination intensityat each pixel being determined by interpolation from the resultantillumination intensities at the respective display cell corners.
 3. Amethod according to claim 1, wherein the cosine of the said angle isused to determine the illumination intensity and is itself determinedfrom the dot product of a vector representing the said direction of thelight source and a vector directed from the light source to the saidpoint of the feature.
 4. A method according to claim 3, wherein thedetermining an illumination intensity step is performed as a function ofthe square of the cosine of said angle which squared cosine isdetermined by processing digital electrical signals representing modeland simulated light source data as summarized below: ##EQU7## whereL_(x) =l_(x) /d_(x), L_(y) =l_(y) /d_(y), L_(z) =_(z), X_(o) =x_(o)/d_(x), Y_(o) =y_(o) /d_(y), Z_(o) =z_(o),(l_(x), l_(y), l_(z)) are thecomponents of the vector representing the said direction of the lightsource (x_(s), y_(s)) are the screen space coordinates of the said point(x_(o), y_(o), z_(o)) are the eyepoint space coordinates of the lightsource (x_(p), y_(p), z_(p)) are the eyepoint space coordinates of thesaid point srcf is a slant range correction factor L_(o) =x_(o) l_(x)+y_(o) l_(y) +z_(o) l_(z) L_(d) =x_(o) ² +y_(o) ² +z_(o) ² d_(x) andd_(y) are functions of the half angle of the display.
 5. A methodaccording to claim 1, wherein digital data representing illuminationintensities are stored for each of a predetermined number of sampleangles in a look up table in a digital data addressable memory, and thestored values in the digital data addressable memory are addressed bysaid angle to derive the appropriate illumination intensities.
 6. Amethod according to claim 5, wherein the stored values are addressed bythe square of said angle to derive the illumination intensity.
 7. Amethod according to claim 1, wherein digital data representing rangeattenuation factors are stored in a look up table in a digital dataaddressable memory, and the stored values in addressable memory areaddressed by the distance from the eyepoint to said point to derive anappropriate range attenuation factor to use in said reducing step.
 8. Amethod according to claim 7, wherein the stored range attenuationfactors are addressed by the square of the distance from the eyepoint tosaid point to derive a range attenuation factor.
 9. A method as in claim1 for displaying an image simulating the illumination effects on theatmosphere of a vehicle-mounted light source in an image displayed on ascreen, the image being intended to represent the appearance of a modelstructure which is defined in a digital signal database in world spacecoordinates from an eyepoint position in world space, the modelstructure being defined in terms of a plurality of structural featureseach having predetermined structural attributes, and the simulatedvehicle-mounted light source being defined in terms of an origin and adirection in eyepoint space, said method further comprising the stepsof:a. defining a triangular beam polygon having one apex at the originof the light source, the beam polygon lying in a plane including an axisthrough the origin parallel to the said direction, being normal to aline drawn from the eyepoint and intersecting the said axis, and havinga defined length and half angle from the said one vertex, b. determiningsecond and third vertices of the beam polygon, c. determining theintensity of illumination of the beam polygon as a function of distancefrom the light source, and d. displaying the beam polygon on the screenin accordance with its determined vertices and intensity.
 10. A methodaccording to claim 9, wherein digital signals representing a planeequation Ax+By+Cz+D=O are generated for the beam polygon fromcoordinates of the origin of the light source and components of a vectorcorresponding to the said axis, and digital signals representing thesecond and third vertices are are generated from the plane equation andthe said defined length and half angle.
 11. A method according to claim9, wherein the intensity of illumination of a point on the beam polygonis determined as a function of the angle between the light sourcedirection and a line drawn to that point from the light source.
 12. Amethod according to claim 11, wherein the intensity is determined as afunction of the cosine of said angle which is determined from the dotproduct of a vector representing the said direction of the light sourceand a vector directed from the light source to the said point of thefeature.
 13. A method according to claim 12, wherein the intensity isdetermined as a function of the square of the cosine of said angle whichis determined by processing digital electrical signals representingmodel and simulated light source data as summarized below: ##EQU8##where L_(x) =l_(x) /d_(x), L_(y) =l_(y) /d_(y), L_(z) =l_(z), X_(o)=x_(o) /d_(x), Y_(o) =y_(o) /d_(y), Z_(o) =z_(o) (l_(x), l_(y), l_(z))are the components of the vector representing the said direction of thelight source (x_(s), y_(s)) are the screen space coordinates of the saidpoint (x_(o), y_(o), z_(o)) are the eyepoint space coordinates of thelight source (x_(p), y_(p), z_(p)) are the eyepoint space coordinates ofthe said point srcf is a slant range correction factor L_(o) =x_(o)l_(x) +y_(o) l_(y) +z_(o) l_(z) L_(d) =x_(o) ² +y_(o) ² +z_(o) ² d_(x)and d_(y) are functions of the half angle of the display.
 14. A methodaccording to claim 11, wherein digital signals representing illuminationintensities are stored in a digital data addressable memory for each ofa predetermined number of sample angles in a look up table, and thestored values in addressable memory are addressed by said angle toderive the appropriate illumination intensities.
 15. A method accordingto claim 14, wherein the stored values in addressable memory areaddressed by the square of said angle to derive the illuminationintensity by interpolation between two values thus read out from thememory.
 16. A method according to claim 11, wherein digital signalsrepresenting range attenuation factors are stored in a look up table inan addressable memory, and the stored signals are addressed by theproduct of the square of the distance from the light source to the pointand the square of the said angle to derive the appropriate rangeattenuation factor.
 17. An apparatus for displaying an image simulatingthe illumination effects of a vehicle-mounted light source in an imagedisplayed on a screen, the image being intended to represent theappearance of a model structure which is defined in a digital signaldatabase in world space coordinates, from an eyepoint position in worldspace, the model structure being defined in terms of a plurality ofstructural features each having predetermined structural attributes, andthe simulated vehicle-mounted light source being defined in terms of anorigin and a direction in eyepoint space, said apparatus comprisingdigital signal processing circuits and addressable digital signal memorydevices including:a. means for determining, for each structural featurepotentially contributing to the displayed image, the angular position ofa point on that structural feature relative to the light source as theangle between the light source direction and a line drawn to that pointfrom the light source, b. means for determining an illuminationintensity for that point by reference to said angle, c. means forreducing the illumination intensity as a function of the distance fromthe eyepoint to said point to provide a resultant intensity, and d.means for modulating the attributes of the structural feature at saidpoint in a displayed image on said screen as a function of saidresultant intensity.
 18. An apparatus as in claim 17 for displaying animage simulating the illumination effects on the atmosphere of avehicle-mounted light source in an image displayed on a screen, theimage being intended to represent the appearance of a model structurewhich is defined in a digital signal database in world space coordinatesfrom an eyepoint position in world space, the model structure beingdefined in terms of a plurality of structural features each havingpredetermined structural attributes, and the simulated vehicle-mountedlight source being defined in terms of an origin and a direction ineyepoint space, said apparatus further comprising:a. means for defininga triangular beam polygon having one apex at the origin of the lightsource, the beam polygon lying in a plane coincident with an axisthrough the origin parallel to the said direction, being normal to aline drawn from the eyepoint and intersecting the said axis, and havinga defined length and half angle from the said one vertex, b. means fordetermining second and third vertices of the beam polygon, c. means fordetermining the intensity of illumination of the beam polygon as afunction of distance from the eyepoint, and d. means for displaying thebeam polygon on the screen in accordance with its determined verticesand intensity.